package string;
/**
 *      判断是否以选定字符开头
 *      判断是否以选定字符结尾
 */
public class StartsWithDemo {
    public static void main(String[] args) {
        String str = "thinking in java";
        boolean start = str.startsWith("thinking");
        System.out.println(start);

        boolean ends = str.endsWith(",jpg");
        System.out.println(ends);
    }
}